home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbcolsource.man < prev    next >
Text File  |  1993-04-22  |  3KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89              dbcolsource
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbcolsource
  6.  
  7.   FUNCTION:
  8.        Return a pointer to the name of the database  column  from  which
  9.        the specified regular result column was derived.
  10.  
  11.   SYNTAX:
  12.        char *dbcolsource(dbproc, colnum)
  13.  
  14.        DBPROCESS *dbproc;
  15.        int       colnum;
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbcolsource             Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o dbcolsource() is one of the DB-Library  browse  mode  routines.
  30.          It is usable only with results from a browse-mode SELECT (i.e.,
  31.          a SELECT containing the key words FOR BROWSE).  See the  Intro-
  32.          duction for a detailed discussion of browse mode.
  33.        o dbcolsource() provides an application with information it needs
  34.          to  update a database column, based on an ad hoc query.  SELECT
  35.          statements may optionally  specify  header  names  for  regular
  36.          (i.e., non-compute) result columns:
  37.  
  38.             select author = au_lname from authors for browse
  39.  
  40.          When updating a table, you must use the database  column  name,
  41.          not   the   header  name  (in  this  example,  "au_lname",  not
  42.          "author").  You can use the dbcolsource() routine  to  get  the
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89              dbcolsource
  47.   ______________________________________________________________________
  48.          underlying database column name:
  49.  
  50.             dbcolsource(dbproc, 1)
  51.  
  52.          This call will return a pointer to the string "au_lname".
  53.  
  54.        o dbcolsource() is useful for ad hoc queries.  If the  query  has
  55.          been  hardcoded  into  the  program,  this routine is obviously
  56.          unnecessary.
  57.        o The  application  can  call  dbcolsource()   any   time   after
  58.          dbresults().
  59.  
  60.        o Example 7 in the DB-Library  Reference  Supplement  contains  a
  61.          call to dbcolsource().
  62.  
  63.   PARAMETERS:
  64.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  65.            connection for a particular front-end/SQL Server process.  It
  66.  
  67.  
  68.   dbcolsource             Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.            contains all the information that DB-Library uses  to  manage
  71.            communications and data between the front end and SQL Server.
  72.        colnum -  The number of the result  column  of  interest.  Column
  73.            numbers start at 1.
  74.  
  75.   RETURNS:
  76.        A pointer to a null-terminated column name. This pointer will  be
  77.        NULL if the column number is out of range or if the column is the
  78.        result of a SQL expression, such as "max(colname)".
  79.  
  80.   SEE ALSO:
  81.        dbcolbrowse, dbqual, dbtabbrowse, dbtabcount,  dbtabname,  dbtab-
  82.        source, dbtsnewlen, dbtsnewval, dbtsput
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.